    import java.io.*;
    import java.net.ServerSocket;
    import java.net.Socket;
    import java.util.ArrayList;
    import java.util.Properties;


    public class Server {
        static ArrayList<Socket> list = new ArrayList<>();

        public static void main(String[] args) throws IOException {
            //创建服务的对象，绑定端口号
            ServerSocket ss = new ServerSocket(10000);
            //1.读取本地文件里正确的用户名和密码
            Properties p = new Properties();
            FileInputStream fis = new FileInputStream("..\\WX\\.idea\\Server\\userinfo.txt");
            //把文件里的数据加载到p集合当中
            p.load(fis);
            fis.close();

            while (true) {
                //2.只要来了一个客户端，就开一条线程处理
                //等待客户端连接
                Socket socket = ss.accept();
                //读取客服端发送的数据
                BufferedReader br = new BufferedReader(new InputStreamReader(socket.getInputStream()));
                System.out.println("有客户端来链接");
                Mythread t = new Mythread(socket, p);
                t.start();

            }


        }
    }
